function Promise(executor){
	// 状态
	this.state="pending";
	// 状态值
	this.result = undefined;
	try{
		executor(function(value){
			// 将状态更改为fulfilled,成功值更改为接收的参数
			this.state = "fulfilled";
			this.result = value;
		}.bind(this),function(value){
			this.state = "rejected";
			this.result = value;
		}.bind(this));
	}catch (err){
		this.state = "rejected";
		this.result = err;
	}


}
export default Promise;